package controller;
import entity.Goods;
import service.impl.GoodsServiceImpl;

public class GoodsController {
	GoodsServiceImpl gsi = new GoodsServiceImpl();
	public boolean save(Goods goods) {
		return gsi.save(goods);
	}

	public boolean sale(String name) {
		return gsi.sale(name);
	}

	public boolean updateById(Goods goods, int id) {
		return gsi.updateById(goods, id);
	}

	public Goods[] selectAll() {
		return gsi.selectAll();
	}

	public Goods selectById(int id) {
		return gsi.selectById(id);
	}

	public Goods selectByName(String name) {
		return gsi.selectByName(name);
	}

	public Goods[] selectByPrice(double lowPrice, double highPrice) {
		return gsi.selectByPrice(lowPrice, highPrice);
	}

	public Goods[] selectAllSoldOutGoods() {
		return gsi.selectAllSoldOutGoods();
	}

	public Goods[] desByGoodsCount() {
		return gsi.desByGoodsCount();
	}
}
